package omit.wage.controller;


import lombok.extern.slf4j.Slf4j;
import omit.wage.result.PageResult;
import omit.wage.result.Result;
import omit.wage.dto.BankPageDTO;
import omit.wage.service.IBankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-06-11
 */
@Slf4j
@RestController
@RequestMapping("/bank")
public class BankController {
    @Autowired
    private IBankService iBankService;
    //分页查询的接口
    @GetMapping
    public Result list(BankPageDTO bankPageDTO){
        log.info("分页查询银行表的信息,参数为：{}", bankPageDTO);
        PageResult pageResult = iBankService.pageQuery(bankPageDTO);
        return Result.success(pageResult);
    }
}
